//
//  ImageListVC.m
//  UILbrary
//
//  Created by Apple on 2022/6/6.
//  Copyright © 2022 mac. All rights reserved.
//

#import "ImageListVC.h"
#import "WBBBigImgBroswe.h"

@interface ImageListVC ()

@end

@implementation ImageListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
//    UILabel *label = [UILabel new];
//    label.text = @"查看大图浏览";
//    label.frame = CGRectMake(0, 0, 150, 40);
//    label.backgroundColor = [UIColor lightGrayColor];
//    label.center = self.view.center;
//    label.textAlignment = NSTextAlignmentCenter;
//    [self.view addSubview:label];
    
    UIButton *button_1 = [UIButton new];
    [button_1 setTitle:@"查看大图浏览" forState:UIControlStateNormal];
    button_1.backgroundColor = [UIColor lightGrayColor];
    button_1.frame = CGRectMake(0, 0, 150, 40);
    button_1.center = CGPointMake(self.view.center.x, self.view.center.y - 40);
    [button_1 addTarget:self action:@selector(action_1) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button_1];
    
    UIButton *button_2 = [UIButton new];
    [button_2 setTitle:@"指定位置大图浏览" forState:UIControlStateNormal];
    button_2.backgroundColor = [UIColor lightGrayColor];
    button_2.frame = CGRectMake(0, 0, 150, 40);
    button_2.center = CGPointMake(self.view.center.x, self.view.center.y + 40);
    [button_2 addTarget:self action:@selector(action_2) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button_2];

}

- (void)action_1
{
    
    [WBBBigImgBroswe showWithImgUrlList:self.imgUrlList];
    
}


- (void)action_2
{
    [WBBBigImgBroswe showWithImgUrlList:self.imgUrlList index:1];
}

- (NSArray *)imgUrlList
{
    NSArray *arr = @[
        @"https://img.zcool.cn/community/01248f5ca5a95ca80121416814b1d1.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01892e5ca5a960a801208f8bddc2d5.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01ff095ca5a965a801214168ff3644.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01248f5ca5a95ca80121416814b1d1.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01892e5ca5a960a801208f8bddc2d5.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01ff095ca5a965a801214168ff3644.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01248f5ca5a95ca80121416814b1d1.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01892e5ca5a960a801208f8bddc2d5.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
        @"https://img.zcool.cn/community/01ff095ca5a965a801214168ff3644.jpg?x-oss-process=image/auto-orient,1/resize,m_lfit,w_1280,limit_1/sharpen,100/format,webp/quality,Q_100",
    ];
    return arr;
}
@end
